home *** CD-ROM | disk | FTP | other *** search
- t = (0:10:.05)';
- x = exp (-0.5*t) .* (cos (2*pi*3*t) + sin (2*pi*7*t));
- X = fft (x);
- rfile faxis
- freq = faxis (X, .05, 3);
- mag = abs (X);
- rfile angle
- phase = angle (X);
- pstart (1,2,"xwin");
-
- ptitle ("Magnitude of FFT")
- xlabel ("Frequency (Hertz)");
- plwid(6);
- plot ([freq,mag]);
-
- ptitle ("Angle (atan2(imag/real)) of FFT")
- xlabel ("Frequency (Hertz)");
- ylabel ("Angle (radians)");
- plwid(6);
- plot ([freq,phase]);
- plprint ("p3.ps");
-